
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>安装 · InfluxDB中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jasper">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="getting_start.html" />
    
    
    <link rel="prev" href="./" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://legacy.gitbook.com/book/jasper-zhang1/influxdb" target="_blank" class="custom-link">InfluxDB中文文档</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.2.1" data-path="installation.html">
            
                <a href="installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="getting_start.html">
            
                <a href="getting_start.html">
            
                    
                    入门指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Guide/">
            
                <a href="../Guide/">
            
                    
                    使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Guide/writing_data.html">
            
                <a href="../Guide/writing_data.html">
            
                    
                    写入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Guide/querying_data.html">
            
                <a href="../Guide/querying_data.html">
            
                    
                    查询数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Guide/downsampling_and_retention.html">
            
                <a href="../Guide/downsampling_and_retention.html">
            
                    
                    采样和数据保留
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Guide/hardware_sizing.html">
            
                <a href="../Guide/hardware_sizing.html">
            
                    
                    硬件指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Guide/https_setup.html">
            
                <a href="../Guide/https_setup.html">
            
                    
                    HTTPS设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Concepts/">
            
                <a href="../Concepts/">
            
                    
                    概念介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Concepts/key_concepts.html">
            
                <a href="../Concepts/key_concepts.html">
            
                    
                    关键概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Concepts/glossary.html">
            
                <a href="../Concepts/glossary.html">
            
                    
                    专业术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Concepts/crosswalk.html">
            
                <a href="../Concepts/crosswalk.html">
            
                    
                    与SQL比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Concepts/insights_tradeoffs.html">
            
                <a href="../Concepts/insights_tradeoffs.html">
            
                    
                    InfluxDB的设计见解和权衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Concepts/schema_and_data_layout.html">
            
                <a href="../Concepts/schema_and_data_layout.html">
            
                    
                    schema设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Concepts/storage_engine.html">
            
                <a href="../Concepts/storage_engine.html">
            
                    
                    存储引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Write_protocols/">
            
                <a href="../Write_protocols/">
            
                    
                    写入协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Write_protocols/line_protocol.html">
            
                <a href="../Write_protocols/line_protocol.html">
            
                    
                    行协议
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../Query_language/">
            
                <a href="../Query_language/">
            
                    
                    查询语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../Query_language/data_exploration.html">
            
                <a href="../Query_language/data_exploration.html">
            
                    
                    数据查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../Query_language/schema_exploration.html">
            
                <a href="../Query_language/schema_exploration.html">
            
                    
                    schema查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../Query_language/database_management.html">
            
                <a href="../Query_language/database_management.html">
            
                    
                    数据库管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../Query_language/continuous_queries.html">
            
                <a href="../Query_language/continuous_queries.html">
            
                    
                    连续查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../Query_language/functions.html">
            
                <a href="../Query_language/functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../Query_language/math_operators.html">
            
                <a href="../Query_language/math_operators.html">
            
                    
                    数学运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../Query_language/authentication_and_authorization.html">
            
                <a href="../Query_language/authentication_and_authorization.html">
            
                    
                    认证和授权
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Troubleshooting/">
            
                <a href="../Troubleshooting/">
            
                    
                    故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Troubleshooting/faq.html">
            
                <a href="../Troubleshooting/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Troubleshooting/system_monitor.html">
            
                <a href="../Troubleshooting/system_monitor.html">
            
                    
                    系统监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Troubleshooting/query_management.html">
            
                <a href="../Troubleshooting/query_management.html">
            
                    
                    查询管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Troubleshooting/error_messages.html">
            
                <a href="../Troubleshooting/error_messages.html">
            
                    
                    错误信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >安装</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h1>
<p>&#x8FD9;&#x7BC7;&#x5C06;&#x4F1A;&#x4ECB;&#x7ECD;&#x600E;&#x4E48;&#x5B89;&#x88C5;&#x3001;&#x8FD0;&#x884C;&#x548C;&#x914D;&#x7F6E;InfluxDB&#x3002;</p>
<h2 id="&#x51C6;&#x5907;">&#x51C6;&#x5907;</h2>
<p>&#x5B89;&#x88C5;InfluxDB&#x5305;&#x9700;&#x8981;<code>root</code>&#x6216;&#x662F;&#x6709;&#x7BA1;&#x7406;&#x5458;&#x6743;&#x9650;&#x624D;&#x53EF;&#x4EE5;&#x3002;</p>
<h3 id="&#x7F51;&#x7EDC;">&#x7F51;&#x7EDC;</h3>
<p>InfluxDB&#x9ED8;&#x8BA4;&#x4F7F;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x7F51;&#x7EDC;&#x7AEF;&#x53E3;&#xFF1A;</p>
<ul>
<li>TCP&#x7AEF;&#x53E3;<code>8086</code>&#x7528;&#x4F5C;InfluxDB&#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x548C;&#x670D;&#x52A1;&#x7AEF;&#x7684;http api&#x901A;&#x4FE1;</li>
<li>TCP&#x7AEF;&#x53E3;<code>8088</code>&#x7ED9;&#x5907;&#x4EFD;&#x548C;&#x6062;&#x590D;&#x6570;&#x636E;&#x7684;RPC&#x670D;&#x52A1;&#x4F7F;&#x7528;</li>
</ul>
<p>&#x53E6;&#x5916;&#xFF0C;InfluxDB&#x4E5F;&#x63D0;&#x4F9B;&#x4E86;&#x591A;&#x4E2A;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x81EA;&#x5B9A;&#x4E49;&#x7AEF;&#x53E3;&#x7684;&#x63D2;&#x4EF6;&#xFF0C;&#x6240;&#x4EE5;&#x7684;&#x7AEF;&#x53E3;&#x6620;&#x5C04;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4FEE;&#x6539;&#xFF0C;&#x5BF9;&#x4E8E;&#x9ED8;&#x8BA4;&#x5B89;&#x88C5;&#x7684;InfluxDB&#xFF0C;&#x8FD9;&#x4E2A;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4F4D;&#x4E8E;<code>/etc/influxdb/influxdb.conf</code>&#x3002;</p>
<h3 id="ntp">NTP</h3>
<p>InfluxDB&#x4F7F;&#x7528;&#x670D;&#x52A1;&#x5668;&#x672C;&#x5730;&#x65F6;&#x95F4;&#x7ED9;&#x6570;&#x636E;&#x52A0;&#x65F6;&#x95F4;&#x6233;&#xFF0C;&#x800C;&#x4E14;&#x662F;UTC&#x65F6;&#x533A;&#x7684;&#x3002;&#x5E76;&#x4F7F;&#x7528;NTP&#x6765;&#x540C;&#x6B65;&#x670D;&#x52A1;&#x5668;&#x4E4B;&#x95F4;&#x7684;&#x65F6;&#x95F4;&#xFF0C;&#x5982;&#x679C;&#x670D;&#x52A1;&#x5668;&#x7684;&#x65F6;&#x949F;&#x6CA1;&#x6709;&#x901A;&#x8FC7;NTP&#x540C;&#x6B65;&#xFF0C;&#x90A3;&#x4E48;&#x5199;&#x5165;InfluxDB&#x7684;&#x6570;&#x636E;&#x7684;&#x65F6;&#x95F4;&#x6233;&#x5C31;&#x53EF;&#x80FD;&#x4E0D;&#x51C6;&#x786E;&#x3002;</p>
<h2 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h2>
<p>&#x5BF9;&#x4E8E;&#x4E0D;&#x60F3;&#x5B89;&#x88C5;&#x7684;&#x7528;&#x6237;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;inluxdata&#x516C;&#x53F8;&#x63D0;&#x4F9B;&#x7684;&#x4E91;&#x4EA7;&#x54C1;&#xFF08;&#x5E2E;&#x5FD9;&#x7ED9;&#x4ED6;&#x4EEC;&#x6253;&#x4E2A;&#x5E7F;&#x544A;&#x5427;&#xFF0C;&#x6BD5;&#x7ADF;&#x5F00;&#x6E90;&#x4E0D;&#x6613;&#xFF09;&#x3002;</p>
<h3 id="debain--ubuntu">Debain &amp; Ubuntu</h3>
<p>Debian&#x548C;Ubuntu&#x7528;&#x6237;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7528;<code>apt-get</code>&#x5305;&#x7BA1;&#x7406;&#x6765;&#x5B89;&#x88C5;&#x6700;&#x65B0;&#x7248;&#x672C;&#x7684;InfluxDB&#x3002;</p>
<p>&#x5BF9;&#x4E8E;Ubuntu&#x7528;&#x6237;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x6DFB;&#x52A0;InfluxDB&#x7684;&#x4ED3;&#x5E93;</p>
<pre><code>curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/lsb-release
echo &quot;deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable&quot; | sudo tee /etc/apt/sources.list.d/influxdb.list
</code></pre><p>Debian&#x7528;&#x6237;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#xFF1A;</p>
<pre><code>curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
test $VERSION_ID = &quot;7&quot; &amp;&amp; echo &quot;deb https://repos.influxdata.com/debian wheezy stable&quot; | sudo tee /etc/apt/sources.list.d/influxdb.list
test $VERSION_ID = &quot;8&quot; &amp;&amp; echo &quot;deb https://repos.influxdata.com/debian jessie stable&quot; | sudo tee /etc/apt/sources.list.d/influxdb.list
</code></pre><p>&#x7136;&#x540E;&#x5B89;&#x88C5;&#x3001;&#x8FD0;&#x884C;InfluxDB&#x670D;&#x52A1;&#xFF1A;</p>
<pre><code>sudo apt-get update &amp;&amp; sudo apt-get install influxdb
sudo service influxdb start
</code></pre><p>&#x5982;&#x679C;&#x4F60;&#x7684;&#x7CFB;&#x7EDF;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;Systemd(&#x6BD4;&#x5982;Ubuntu 15.04+, Debian 8+&#xFF09;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x542F;&#x52A8;&#xFF1A;</p>
<pre><code>sudo apt-get update &amp;&amp; sudo apt-get install influxdb
sudo systemctl start influxdb
</code></pre><h3 id="redhat--centos">RedHat &amp; CentOS</h3>
<p>RedHat&#x548C;CentOS&#x7528;&#x6237;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7528;<code>yum</code>&#x5305;&#x7BA1;&#x7406;&#x6765;&#x5B89;&#x88C5;&#x6700;&#x65B0;&#x7248;&#x672C;&#x7684;InfluxDB&#x3002;</p>
<pre><code>cat &lt;&lt;EOF | sudo tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF
</code></pre><p>&#x4E00;&#x65E6;&#x52A0;&#x5230;&#x4E86;<code>yum</code>&#x6E90;&#x91CC;&#x9762;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x8FD0;&#x884C;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x6765;&#x5B89;&#x88C5;&#x548C;&#x542F;&#x52A8;InfluxDB&#x670D;&#x52A1;&#xFF1A;</p>
<pre><code>sudo yum install influxdb
sudo service influxdb start
</code></pre><p>&#x5982;&#x679C;&#x4F60;&#x7684;&#x7CFB;&#x7EDF;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;Systemd(&#x6BD4;&#x5982;CentOS 7+, RHEL 7+&#xFF09;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x542F;&#x52A8;&#xFF1A;</p>
<pre><code>sudo yum install influxdb
sudo systemctl start influxdb
</code></pre><h3 id="mac-os-x">MAC OS X</h3>
<p>OS X 10.8&#x6216;&#x8005;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#x7684;&#x7528;&#x6237;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;Homebrew&#x6765;&#x5B89;&#x88C5;InfluxDB; &#x4E00;&#x65E6;<code>brew</code>&#x5B89;&#x88C5;&#x4E86;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;&#x6765;&#x5B89;&#x88C5;InfluxDB&#xFF1A;</p>
<pre><code>brew update
brew install influxdb
</code></pre><p>&#x767B;&#x9646;&#x540E;&#x5728;&#x7528;<code>launchd</code>&#x5F00;&#x59CB;&#x8FD0;&#x884C;InfluxDB&#x4E4B;&#x524D;&#xFF0C;&#x5148;&#x8DD1;&#xFF1A;</p>
<pre><code>ln -sfv /usr/local/opt/influxdb/*.plist ~/Library/LaunchAgents
</code></pre><p>&#x7136;&#x540E;&#x8FD0;&#x884C;InfluxDB&#xFF1A;</p>
<pre><code>launchctl load ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist
</code></pre><p>&#x5982;&#x679C;&#x4F60;&#x4E0D;&#x60F3;&#x7528;&#x6216;&#x662F;&#x4E0D;&#x9700;&#x8981;launchctl&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5728;terminal&#x91CC;&#x8FD0;&#x884C;&#x4E0B;&#x9762;&#x547D;&#x4EE4;&#x6765;&#x542F;&#x52A8;InfluxDB&#xFF1A;</p>
<pre><code>influxd -config /usr/local/etc/influxdb.conf
</code></pre><h2 id="&#x914D;&#x7F6E;">&#x914D;&#x7F6E;</h2>
<p>&#x5B89;&#x88C5;&#x597D;&#x4E4B;&#x540E;&#xFF0C;&#x6BCF;&#x4E2A;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x90FD;&#x6709;&#x4E86;&#x9ED8;&#x8BA4;&#x7684;&#x914D;&#x7F6E;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x547D;&#x4EE4;<code>influxd config</code>&#x6765;&#x67E5;&#x770B;&#x8FD9;&#x4E9B;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x3002;</p>
<p>&#x5728;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<code>/etc/influxdb/influxdb.conf</code>&#x4E4B;&#x4E2D;&#x7684;&#x5927;&#x90E8;&#x5206;&#x914D;&#x7F6E;&#x90FD;&#x88AB;&#x6CE8;&#x91CA;&#x6389;&#x4E86;&#xFF0C;&#x6240;&#x6709;&#x8FD9;&#x4E9B;&#x88AB;&#x6CE8;&#x91CA;&#x6389;&#x7684;&#x914D;&#x7F6E;&#x90FD;&#x662F;&#x7531;&#x5185;&#x90E8;&#x9ED8;&#x8BA4;&#x503C;&#x51B3;&#x5B9A;&#x7684;&#x3002;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x91CC;&#x4EFB;&#x610F;&#x6CA1;&#x6709;&#x6CE8;&#x91CA;&#x7684;&#x914D;&#x7F6E;&#x90FD;&#x53EF;&#x4EE5;&#x7528;&#x6765;&#x8986;&#x76D6;&#x5185;&#x90E8;&#x9ED8;&#x8BA4;&#x503C;&#xFF0C;&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x672C;&#x5730;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E0D;&#x9700;&#x8981;&#x5305;&#x62EC;&#x6BCF;&#x4E00;&#x9879;&#x914D;&#x7F6E;&#x3002;</p>
<p>&#x6709;&#x4E24;&#x79CD;&#x65B9;&#x6CD5;&#x53EF;&#x4EE5;&#x7528;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x6765;&#x8FD0;&#x884C;InfluxDB&#xFF1A;</p>
<ul>
<li>&#x8FD0;&#x884C;&#x7684;&#x65F6;&#x5019;&#x901A;&#x8FC7;&#x53EF;&#x9009;&#x53C2;&#x6570;<code>-config</code>&#x6765;&#x6307;&#x5B9A;&#xFF1A;</li>
</ul>
<pre><code>influxd -config /etc/influxdb/influxdb.conf
</code></pre><ul>
<li>&#x8BBE;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;<code>INFLUXDB_CONFIG_PATH</code>&#x6765;&#x6307;&#x5B9A;&#xFF0C;&#x4F8B;&#x5982;&#xFF1A;</li>
</ul>
<pre><code>echo $INFLUXDB_CONFIG_PATH
/etc/influxdb/influxdb.conf


influxd
</code></pre><p>&#x5176;&#x4E2D;<code>-config</code>&#x7684;&#x4F18;&#x5148;&#x7EA7;&#x9AD8;&#x4E8E;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x3002;</p>
<p>&#x60F3;&#x770B;&#x66F4;&#x8BE6;&#x7EC6;&#x7684;&#x914D;&#x7F6E;&#x89E3;&#x91CA;&#xFF0C;&#x8BF7;&#x79FB;&#x6B65;<a href="">&#x914D;&#x7F6E;</a>&#x6587;&#x6863;&#x3002;</p>
<h2 id="&#x6258;&#x7BA1;&#x5728;aws&#x4E0A;">&#x6258;&#x7BA1;&#x5728;AWS&#x4E0A;</h2>
<h3 id="&#x786C;&#x4EF6;">&#x786C;&#x4EF6;</h3>
<p>&#x6211;&#x4EEC;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x4E24;&#x5757;SSD&#x5377;&#xFF0C;&#x4E00;&#x4E2A;&#x662F;&#x4E3A;&#x4E86;<code>influxdb/wal</code>&#xFF0C;&#x4E00;&#x4E2A;&#x662F;&#x4E3A;&#x4E86;<code>influxdb/data</code>&#xFF1B;&#x6839;&#x636E;&#x60A8;&#x7684;&#x8D1F;&#x8F7D;&#x91CF;&#xFF0C;&#x6BCF;&#x4E2A;&#x5377;&#x5E94;&#x5177;&#x6709;&#x5927;&#x7EA6;1k-3k&#x7684;IOPS&#x3002;<code>influxdb/data</code>&#x5377;&#x5E94;&#x8BE5;&#x6709;&#x66F4;&#x591A;&#x7684;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#x548C;&#x8F83;&#x4F4E;&#x7684;IOPS&#xFF0C;&#x800C;<code>influxdb/wal</code>&#x5377;&#x5219;&#x76F8;&#x53CD;&#x6709;&#x8F83;&#x5C11;&#x7684;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#x4F46;&#x662F;&#x8F83;&#x9AD8;&#x7684;IOPS&#x3002;</p>
<p>&#x6BCF;&#x53F0;&#x673A;&#x5668;&#x5E94;&#x8BE5;&#x6709;&#x4E0D;&#x5C11;&#x4E8E;8G&#x7684;&#x5185;&#x5B58;&#x3002;</p>
<p>&#x5728;AWS&#x4E0A;&#x7684;R4&#x578B;&#x53F7;&#x7684;&#x673A;&#x5668;&#x4E0A;&#x7684;&#x6211;&#x4EEC;&#x770B;&#x5230;&#x4E86;&#x6700;&#x597D;&#x7684;&#x6027;&#x80FD;&#xFF0C;&#x56E0;&#x4E3A;&#x8FD9;&#x79CD;&#x578B;&#x53F7;&#x7684;&#x673A;&#x5668;&#x63D0;&#x4F9B;&#x7684;&#x5185;&#x5B58;&#x6BD4;C3/C4&#x548C;M4&#x578B;&#x53F7;&#x673A;&#x5668;&#x5927;&#x5F97;&#x591A;&#x3002;</p>
<h3 id="&#x914D;&#x7F6E;aws&#x5B9E;&#x4F8B;">&#x914D;&#x7F6E;aws&#x5B9E;&#x4F8B;</h3>
<p>&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#x5047;&#x5B9A;&#x4F60;&#x6B63;&#x5728;&#x4F7F;&#x7528;&#x4E24;&#x4E2A;SSD&#x5377;&#xFF0C;&#x5E76;&#x4E14;&#x5DF2;&#x6B63;&#x786E;&#x5B89;&#x88C5;&#x5B83;&#x4EEC;&#x3002;&#x6B64;&#x793A;&#x4F8B;&#x8FD8;&#x5047;&#x5B9A;&#x6BCF;&#x4E2A;&#x5377;&#x90FD;&#x5B89;&#x88C5;&#x5728;<code>/mnt/influx</code>&#x548C;<code>/mnt/db</code>&#x4E0A;&#x3002;&#x5982;&#x4F55;&#x5B89;&#x88C5;&#x8BF7;&#x770B;&#x4E9A;&#x9A6C;&#x900A;&#x63D0;&#x4F9B;&#x7684;&#x6587;&#x6863;<a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html" target="_blank">&#x7ED9;&#x4F60;&#x7684;aws&#x5B9E;&#x4F8B;&#x6DFB;&#x52A0;&#x5377;</a>&#x3002;</p>
<h3 id="&#x914D;&#x7F6E;&#x6587;&#x4EF6;">&#x914D;&#x7F6E;&#x6587;&#x4EF6;</h3>
<p>&#x4F60;&#x9700;&#x8981;&#x4FEE;&#x6539;&#x6BCF;&#x4E00;&#x4E2A;InfluxDB&#x5B9E;&#x4F8B;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1A;</p>
<pre><code>...

[meta]
  dir = &quot;/mnt/db/meta&quot;
  ...

...

[data]
  dir = &quot;/mnt/db/data&quot;
  ...
wal-dir = &quot;/mnt/influx/wal&quot;
  ...

...

[hinted-handoff]
    ...
dir = &quot;/mnt/db/hh&quot;
    ...
</code></pre><h3 id="&#x6743;&#x9650;">&#x6743;&#x9650;</h3>
<p>&#x5982;&#x679C;InfluxDB&#x6CA1;&#x6709;&#x4F7F;&#x7528;&#x6807;&#x51C6;&#x7684;&#x6570;&#x636E;&#x548C;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x7684;&#x8BDD;&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x786E;&#x5B9A;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7684;&#x6743;&#x9650;&#x662F;&#x6B63;&#x786E;&#x7684;&#xFF1A;</p>
<pre><code>chown influxdb:influxdb /mnt/influx
chown influxdb:influxdb /mnt/db
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="./" class="navigation navigation-prev " aria-label="Previous page: 介绍">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="getting_start.html" class="navigation navigation-next " aria-label="Next page: 入门指南">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"安装","level":"1.2.1","depth":2,"next":{"title":"入门指南","level":"1.2.2","depth":2,"path":"Introduction/getting_start.md","ref":"Introduction/getting_start.md","articles":[]},"previous":{"title":"介绍","level":"1.2","depth":1,"path":"Introduction/index.md","ref":"Introduction/index.md","articles":[{"title":"安装","level":"1.2.1","depth":2,"path":"Introduction/installation.md","ref":"Introduction/installation.md","articles":[]},{"title":"入门指南","level":"1.2.2","depth":2,"path":"Introduction/getting_start.md","ref":"Introduction/getting_start.md","articles":[]}]},"dir":"ltr"},"config":{"plugins":["comment"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"comment":{"highlightCommented":true},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"jasper-zhang/influxdb-document-cn","theme":"default","author":"jasper","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"InfluxDB中文文档","language":"en","links":{"sidebar":{"InfluxDB中文文档":"https://legacy.gitbook.com/book/jasper-zhang1/influxdb"},"gitbook":true},"gitbook":"*","description":""},"file":{"path":"Introduction/installation.md","mtime":"2019-09-29T09:05:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-29T09:10:37.143Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

